
import request from '@/utils/request';

import { stringify } from 'qs';

//查询组合商品列表
export async function getGoodsList(params) {
  return request(`/blade-goods/compose/list/page?${stringify(params)}`);
}

//获取下架和已售罄商品统计信息
export async function getStatic() {
  return request(`/blade-goods/compose/statistics`);
}

//删除组合商品
export async function deleteGoods(params) {
  return request(`/blade-goods/compose/delete/batch?${stringify(params)}`, {
    method: 'delete'
  });
}

//编辑组合商品时查询是否匹配订单
export async function getCommonOrderUse(params) {
  return request(`/zjf-oms/order/getCommonOrderUse?${stringify(params)}`);
}

//查询渠道列表
export async function queryTypeChannel(params) {
  return request(`/zjf-wms/channel/queryTypeChannel?${stringify(params)}`);
}

//设置渠道
export async function setChannel(params) {
  return request(`/blade-goods/compose/setChannel?${stringify(params)}`);
}

// 添加弹窗检索（按尺码/花型聚合）
export async function getSpecList(params) {
  return request(`/blade-goods/zjfgoods/specList?${stringify(params)}`);
}

//系统商品列表查询
export async function querySysSkuList(params) {
    return request(`/blade-goods/sysGoodsCommon/condition/list?${stringify(params)}`);
  }
  
//根据系统商品款式编码（按尺码/花型聚合）
export async function getSysSpecList(params) {
    return request(`/blade-goods/sysGoods/specList?${stringify(params)}`);
  }

//根据系统供应商商品id查询对应匹配(批量新增组合商品用)
export async function getZjfGoodsBatchByIdsZh(params) {
    return request(`/blade-goods/ecAllgoods/getZjfGoodsBatchByIdsZh`, {
        data: params,
        method: 'post'
    });
  }

  //根据系统商品id查询对应匹配(批量新增组合商品用)
  export async function getSysGoodsBatchByIdsZh(params) {
    return request(`/blade-goods/sysGoods/getSysGoodsBatchByIdsZh`, {
        data: params,
        method: 'post'
    });
  }

    //批量新增组合商品
    export async function batchAddComposeGoods(params) {
        return request(`/blade-goods/compose/batch/add`, {
            data: params,
            method: 'post'
        });
      }